<?php

namespace App\Models\Entity;

use Swoft\Db\Model;
use Swoft\Db\Bean\Annotation\Column;
use Swoft\Db\Bean\Annotation\Entity;
use Swoft\Db\Bean\Annotation\Id;
use Swoft\Db\Bean\Annotation\Required;
use Swoft\Db\Bean\Annotation\Table;

/**
 * 用户实时资金表

 * @Entity()
 * @Table(name="m_cashlist")
 * @uses      MCashlist
 * @version   2018年07月04日
 */
class MCashlist extends Model
{
    /**
     * @var int $id 系统编号
     * @Id()
     * @Column(name="id", type="integer")
     */
    private $id;

    /**
     * @var int $userid 用户编号
     * @Column(name="userid", type="integer")
     */
    private $userid;

    /**
     * @var string $orderid 相关订单号
     * @Column(name="orderid", type="string", length=50)
     */
    private $orderid;

    /**
     * @var int $fundtype 资金类型:1.储值 2.订单支付 3.订单退款 10.系统调账 
     * @Column(name="fundtype", type="tinyint")
     */
    private $fundtype;

    /**
     * @var float $payment 涉及金额
     * @Column(name="payment", type="decimal", default="0.0000")
     */
    private $payment;

    /**
     * @var float $balance 实时可用余额
     * @Column(name="balance", type="decimal", default="0.0000")
     */
    private $balance;

    /**
     * @var string $addtime 发生时间
     * @Column(name="addtime", type="timestamp", default="CURRENT_TIMESTAMP")
     */
    private $addtime;

    /**
     * @var string $payip 资金操作IP
     * @Column(name="payip", type="string", length=15, default="")
     */
    private $payip;

    /**
     * @var string $remark 资金备注
     * @Column(name="remark", type="string", length=100, default="")
     */
    private $remark;

    /**
     * 系统编号
     * @param int $value
     * @return $this
     */
    public function setId(int $value)
    {
        $this->id = $value;

        return $this;
    }

    /**
     * 用户编号
     * @param int $value
     * @return $this
     */
    public function setUserid(int $value): self
    {
        $this->userid = $value;

        return $this;
    }

    /**
     * 相关订单号
     * @param string $value
     * @return $this
     */
    public function setOrderid(string $value): self
    {
        $this->orderid = $value;

        return $this;
    }

    /**
     * 资金类型:1.储值 2.订单支付 3.订单退款 10.系统调账 
     * @param int $value
     * @return $this
     */
    public function setFundtype(int $value): self
    {
        $this->fundtype = $value;

        return $this;
    }

    /**
     * 涉及金额
     * @param float $value
     * @return $this
     */
    public function setPayment(float $value): self
    {
        $this->payment = $value;

        return $this;
    }

    /**
     * 实时可用余额
     * @param float $value
     * @return $this
     */
    public function setBalance(float $value): self
    {
        $this->balance = $value;

        return $this;
    }

    /**
     * 发生时间
     * @param string $value
     * @return $this
     */
    public function setAddtime(string $value): self
    {
        $this->addtime = $value;

        return $this;
    }

    /**
     * 资金操作IP
     * @param string $value
     * @return $this
     */
    public function setPayip(string $value): self
    {
        $this->payip = $value;

        return $this;
    }

    /**
     * 资金备注
     * @param string $value
     * @return $this
     */
    public function setRemark(string $value): self
    {
        $this->remark = $value;

        return $this;
    }

    /**
     * 系统编号
     * @return mixed
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * 用户编号
     * @return mixed
     */
    public function getUserid()
    {
        return $this->userid;
    }

    /**
     * 相关订单号
     * @return mixed
     */
    public function getOrderid()
    {
        return $this->orderid;
    }

    /**
     * 资金类型:1.储值 2.订单支付 3.订单退款 10.系统调账 
     * @return mixed
     */
    public function getFundtype()
    {
        return $this->fundtype;
    }

    /**
     * 涉及金额
     * @return float
     */
    public function getPayment()
    {
        return $this->payment;
    }

    /**
     * 实时可用余额
     * @return float
     */
    public function getBalance()
    {
        return $this->balance;
    }

    /**
     * 发生时间
     * @return string
     */
    public function getAddtime()
    {
        return $this->addtime;
    }

    /**
     * 资金操作IP
     * @return mixed
     */
    public function getPayip()
    {
        return $this->payip;
    }

    /**
     * 资金备注
     * @return mixed
     */
    public function getRemark()
    {
        return $this->remark;
    }

}
